
<!DOCTYPE html>
<html>

<head>
   
    
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--360浏览器优先以webkit内核解析-->


<title>经销商通知公告发布</title>

<link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
<link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
<link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
<!-- Sweet Alert -->
<link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
 <link href="__STATIC__/layout/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>

        .note-editable {
            height: 150px
        }

    </style>

</head>

<body class="white-bg" style="padding: 3px;font-size: 12px">
    <div class="page-heade">
       <h2 class="title_color text-center">经销商通知公告发布</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered bud_hei text-center">
            <tr>
                <td style="width: 140px;">编号</td>
                <td colspan="5" class="text-left">201801190002</td>
            </tr>
            <tr>
               <td style="width: 140px;">姓名</td> 
               <td class="text-left">蔡启豪</td>
                <td style="width: 140px;">部门</td> 
               <td class="text-left">华中大区</td>
                <td style="width: 140px;">职务</td> 
               <td class="text-left">华中大区销售代表</td>
            </tr>
            <tr>
                <td>状态</td>
                <td></td>
                <td>申请时间</td>
                <td class="text-left" id="applytime" colspan="3"></td>
                </td>
            </tr>
            <tr>
                <td>类别</td>
                <td class="text-left">
                    <label for="gonggao">
                        <input type="radio" class="" checked id="gonggao" name="kind" value="0"  onclick="kindClick()">公告
                    </label>
                      <label for="note">
                        <input type="radio" class="" id="note" name="kind" value="1" onclick="kindClick()">通知
                    </label>
                     <label for="news">
                        <input type="radio" class="" id="news" name="kind" value="2" onclick="kindClick()">新闻
                    </label>
                </td>
            </tr>
            <tr>
                <td>标题</td>
                <td class="text-left" colspan="5"><input type="text" name="" class="form-control" style="width: 50%"></td>
            </tr>
            <tr>
                <td>发布对象</td>
                <td class="text-left" colspan="5"> 
                  <div id="kindtext">
                      <div class="form-group fabuclass" >
                          <label for="allAgency">
                        <input type="radio" class="" checked id="allAgency" name="fabuclass" value="0" onclick="divClick()">全部经销商
                    </label>
                      <label for="importAgency">
                        <input type="radio" class="" id="importAgency" name="fabuclass" value="1"  onclick="divClick()">重点经销商
                    </label>
                     <label for="agencyJbie">
                        <input type="radio" class="" id="agencyJbie" name="fabuclass" value="2"  onclick="divClick()">经销商等级
                    </label>  
                    <label for="anFq">
                        <input type="radio" class="" id="anFq" name="fabuclass" value="3"  onclick="divClick()">按分区
                    </label>  
                    <label for="custom">
                        <input type="radio" class="" id="custom" name="fabuclass" value="4"  onclick="divClick()">自定义
                    </label>  
                   </div><br>
                   <div class="form-group" id="agencydj" style="display: none;">
                        <label for="hexinAgency">
                            <input type="checkbox" name="hexinAgency" id="hexinAgency" value="0">核心经销商
                        </label>
                          <label for="secondAgency">
                            <input type="checkbox" name="secondAgency" id="secondAgency" value="1">二级经销商
                        </label>
                         <label for="firstAgency">
                            <input type="checkbox" name="firstAgency" id="firstAgency" value="2">一级经销商
                        </label>
                          <label for="other">
                            <input type="checkbox" name="other" id="other" value="3">其他
                        </label>
                   </div>
                    <div class="form-group" id="anfenqu" style="display: none;">
                        <label for="dnarea">
                            <input type="checkbox" name="dnarea" id="dnarea" value="0">东南大区
                        </label>
                          <label for="hbarea">
                            <input type="checkbox" name="hbarea" id="hbarea" value="1">华北大区
                        </label>
                         <label for="hdarea">
                            <input type="checkbox" name="hdarea" id="hdarea" value="2">华东大区
                        </label>
                          <label for="hnarea">
                            <input type="checkbox" name="hnarea" id="hnarea" value="3">华南大区
                        </label>
                          <label for="hzarea">
                            <input type="checkbox" name="hzarea" id="hzarea" value="4">华中大区
                        </label>
                         <label for="xbarea">
                            <input type="checkbox" name="xbarea" id="xbarea" value="5">西北大区
                        </label>
                         <label for="xnarea">
                            <input type="checkbox" name="xnarea" id="xnarea" value="6">西南大区
                        </label>
                   </div>
                   <div class="form-group" id="customdiv" style="display: none;">
                         <div class="input-group">
                            <input id="area_id" type="text" placeholder="请输入关键字或空格查询"
                                   class="form-control" value="" style="min-width: 300px;width: 300px">
                            <div class="input-group-btn">
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                  
                    <a href="javascript:;" id="select_area">选择</a>

                   </div>
                  </div>
                  <span id="spantext" style="display: none;">所有人</span>
                </td>
            </tr>
            <tr>
                <td colspan="6" class="text-left">
                     <div class="ibox float-e-margins" style="margin-bottom: 0">
                        <div class="ibox-content no-padding">

                            <div class="summernote" id="info">
                                                            </div>

                        </div>
                    </div>
                </td>
            </tr>
        </table>
        <div class="form-group white-bg" style="margin:20px 10px 20px 20px;">
            <div id="uploader" class="wu-example">
                <!--用来存放文件信息-->
                <div id="thelist" class="uploader-list">
                                   </div>
                <div class="btns">
                    <div id="picker">选择文件</div>
                    <button id="ctlBtn" class="btn btn-default">开始上传</button>
                </div>
                <input type="hidden" name="attach" id="attach"  >
            </div>
            <span>注：最多上传15个文件，每个文件小于50M,支持格式：</span><br>jpg,bnp,gif,png,jpeg,tif,raw,doc,docx,xls,xlsx,ppt,pptx,txt,pdf,rar,zip,mp4,avi,rmvb,rm,mid,3gp,AVI,3GP,,mpg,mp3,wma,wav
        </div>

        <div class="padding-10 text-center"><button class="btn btn-primary" type="submit">提交</button><span class="lr_5"></span><button class="btn btn-warning" type="button" id="reset" type="reset">重置</button></div>
    </form>
  
    
<!-- 全局js -->
<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>

<script>
    $(function () {
        $('body').on('click','input[type=text]',function () {
            this.select()
        })
    })
</script>
   <script src="__STATIC__/layout/js/plugins/summernote/summernote.min.js"></script>
<script src="__STATIC__/layout/js/plugins/summernote/summernote-zh-CN.js"></script>

<script>
    getNowFormatDate();
    $("#applytime").html(getNowFormatDate())
   function getNowFormatDate() {
    var date = new Date();
    var seperator1 = "-";
    var seperator2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month >= 1 && month <= 9) {
        month = "0" + month;
    }
    if (strDate >= 0 && strDate <= 9) {
        strDate = "0" + strDate;
    }
    var currentdate = date.getFullYear() + seperator1 + month + seperator1 + strDate
            + " " + date.getHours() + seperator2 + date.getMinutes()
            + seperator2 + date.getSeconds();
    return currentdate;
}

   
    $(document).ready(function () {
        $('.summernote').summernote({
            lang: 'zh-CN'
        });

    
    });

  
 $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        });
  var jieshou = $("#area_id");
 sousuo(jieshou);
       function sousuo(id){
            id.bsSuggest({
            allowNoKeyword: false, //是否允许无关键字时请求数据
            multiWord: true, //以分隔符号分割的多关键字支持
            separator: ",", //多关键字支持时的分隔符，默认为空格
            getDataMethod: "url", //获取数据的方式，总是从 URL 获取
            url: 'http://unionsug.baidu.com/su?p=3&t=' + (new Date()).getTime() + '&wd=',
            /*优先从url ajax 请求 json 帮助数据，注意最后一个参数为关键字请求参数*/
            jsonp: 'cb',
            /*如果从 url 获取数据，并且需要跨域，则该参数必须设置*/
            processData: function (json) { // url 获取数据时，对数据的处理，作为 getData 的回调函数
                var i, len, data = {
                    value: []
                };
                if (!json || !json.s || json.s.length === 0) {
                    return false;
                }

                // console.log(json);
                len = json.s.length;

                jsonStr = "{'value':[";
                for (i = 0; i < len; i++) {
                    data.value.push({
                        word: json.s[i]
                    });
                }
                data.defaults = 'baidu';

                //字符串转化为 js 对象
                return data;
            }
        });

          }

  function divClick(){    
    
       var show="";    
       var apm = document.getElementsByName("fabuclass");    
       for(var i=0;i<apm.length;i++){    
       if(apm[i].checked)    
        show = apm[i].value;    
       }    
         


       switch (show){    
           case '1':    
               document.getElementById("agencydj").style.display="none";    
               document.getElementById("anfenqu").style.display="none"; 
                document.getElementById("customdiv").style.display="none";    
               break;    
           case '2':    
                document.getElementById("agencydj").style.display="block";    
                document.getElementById("anfenqu").style.display="none"; 
                document.getElementById("customdiv").style.display="none";      
               break;    
           case '3':    
             document.getElementById("agencydj").style.display="none";    
                document.getElementById("anfenqu").style.display="block"; 
                document.getElementById("customdiv").style.display="none";     
               break; 
           case '4':    
             document.getElementById("agencydj").style.display="none";    
                document.getElementById("anfenqu").style.display="none"; 
                document.getElementById("customdiv").style.display="block";     
               break;      
           default:    
               document.getElementById("agencydj").style.display="none";    
                document.getElementById("anfenqu").style.display="none"; 
                document.getElementById("customdiv").style.display="none";      
               break;                                                                  
       }    
}   

function kindClick(){
      var show="";    
       var apm = document.getElementsByName("kind");    
       for(var i=0;i<apm.length;i++){    
       if(apm[i].checked)    
        show = apm[i].value;    
       } 

     switch (show){    
           case '1':    
               document.getElementById("kindtext").style.display="block";    
               document.getElementById("spantext").style.display="none";   
               break;    
           case '2':    
                document.getElementById("kindtext").style.display="none";    
                document.getElementById("spantext").style.display="inline";      
               break;    
           default:    
               document.getElementById("kindtext").style.display="block";    
               document.getElementById("spantext").style.display="none";      
               break;                                                                  
       }       
} 
</script>
</body>

</html>